package Final;

import java.util.Scanner;

/*你的代码被嵌在这里 */

public class test24{

    public static void main(String args[]) {

        Scanner s = new Scanner (System.in);
        int i = s.nextInt();
        Animal a = null;
        if (i==1) {
            a = new Cat(s.next(), s.next(), s.next());
        } else if (i==2) {
            a = new Dog(s.next(), s.next(), s.nextInt());
        }
        TestAnimal.introduce(a);
        TestAnimal.action(a);

    }
}
class TestAnimal{

    public static void introduce(Animal a) {
        a.introduce();
    }

    public static void action(Animal a) {
        a.action();
    }
}
class Animal{
    String name;
    String color;

    public Animal(String name, String color) {
        this.name = name;
        this.color = color;
    }
    public void introduce(){
        System.out.println("My name is " + name + ", my color is " + color);
    }
    public void action(){

    }
}
class Dog extends Animal{

    int IQ;

    public Dog(String name, String color, int IQ) {
        super(name, color);
        this.IQ = IQ;
    }

    @Override
    public void action() {
        System.out.println("catch frisbee");
    }

    @Override
    public void introduce() {
        System.out.println("My name is " + name + ", my color is " + color + ", my IQ is " + IQ);
    }
}
class Cat extends Animal{
    String eyeColor;
    public Cat(String name, String color, String eyeColor) {
        super(name, color);
        this.eyeColor = eyeColor;
    }

    @Override
    public void action() {
        System.out.println("catch mouse");
    }

    @Override
    public void introduce() {
        System.out.println("My name is " + name + ", my color is " + color + ", my eyecolor is " + eyeColor);
    }
}